package com.qianduo.front.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.qianduo.front.model.City;
import com.qianduo.front.model.DaikuanCondition;
import com.qianduo.front.service.ReadDaikuanService;

public class Global {
	public static Map<String,List<City>> citiesMap		= new HashMap<String,List<City>>();	
	public static Map<String,String> mapRepayment		= new HashMap<String,String>();
	public static Map<String,String> mapDaikuanType		= new HashMap<String,String>();
	public static Map<String,String> mapCompany			= new HashMap<String,String>();
	public static Map<String,String> mapEstate			= new HashMap<String,String>();
	public static Map<String,String> mapCreditHistory	= new HashMap<String,String>();
	public static Map<String,String> mapLoanPurpose		= new HashMap<String,String>();
	public static Map<String,String> mapProfession		= new HashMap<String,String>();
	public static Map<String,String> mapSecuredCar		= new HashMap<String,String>();
	public static Map<String,List<DaikuanCondition>> mapConditions	= new HashMap<String,List<DaikuanCondition>>();
	static{
		try{
			ReadDaikuanService service	= new ReadDaikuanService();
			Global.citiesMap			= service.getCities();
			Global.mapRepayment			= service.getRepayment();
			Global.mapDaikuanType		= service.getDaikuanType();			
			Global.mapCompany			= service.getCompany();
			Global.mapEstate			= service.getEstate();
			Global.mapCreditHistory		= service.getCreditHistory();						
			Global.mapLoanPurpose		= service.getLoanPurpose();
			Global.mapProfession		= service.getProfession();
			Global.mapSecuredCar		= service.getSecuredCar();
		}catch(Exception e){
			Constants.log.error("Global static",e);
		}
	}
}
